<%@page import="com.mmy.domain.sys.TSysUser"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
<%TSysUser tSysUser = (TSysUser)session.getAttribute("tSysUser");%>
<html>
<head>
<meta charset="UTF-8">
</head>
<style>
	*{
		position: relative;
	 }
</style>
<body>
<script type="text/javascript">
     $(function(){
        $('ul.nav li.nav-item').hover(function(){
            $(this).children('div.subMenu').stop().slideToggle(600);
        });
        
	     $.ajax({
	      url: "/mmy/loadbackmenu",
	      type: "post",
	      dataType : "json",
	      data :"",
	        success : function (reslist){
			        var res=reslist.menu;
			    	var ul=$("<ul class='nav' id='parUl'></ul>");
			    	for(var i=0;i < res.length;i++){
				        var node=res[i];
				        var li=$("<li class='nav-item' id='parLi"+i+"'></li>");
				        var a=$("<a  href='"+node.url+"'>"+node.menuName+"</a>");
				        li.append(a);
				        var childArry = node.childrens;
			        if(childArry.length>0){
			             var div=$("<div ></div>");
			            var dl=$("<ul id='childUl'></ul>");
			            for (var y in childArry) {
			                var dd=$("<li id='childLi"+y+"'><a href='"+childArry[y].url+"'>"+childArry[y].menuName+"</a></li>");
			                dl.append(dd);
			            }
			            div.append(dl);
			             li.append(div);
			        }
			        ul.append(li);
			    }
			    $("#nav").append(ul);
	         }
		});     
});
</script>
	<header id="header" class="header at-padding-large-top at-padding-large-bottom" >
			<div class="container">
			<div class="at-float-right" style="width:34%;">
					<div id="allmap">
					</div>
								<input type="text" id="cityChoice" style="border: none;cursor:pointer;margin-top: 5px;width: 30%;margin-left:20%;" >
								<input type="hidden" id="province" value="">
								<input type="hidden" id="city" value="">
								<div class="at-float-right" style="margin-left:15%;">
					<ul class="perul" >
						<li><a href="perinfo" class="per">${tSysUser.getUserAccount() } </a>
							<input type="hidden" id="logUserOrgID" value="${tSysUser.getOrgID()}">
							<div class="personalpop">
								<div class="perleft">
								 <%-- <c:if test="${tSysUser.getPhotoPath() !=null }">
                            <img id="imges" alt="" src="imges/${tSysUser.getPhotoPath() }">
                        </c:if> --%>
								</div>
								<div class="perright">
									<a href="perinfo">个人信息</a>
									<a href="toupdatepassword">修改密码</a>
									<a href="myscenicreserve">购物车</a>
									<a href="logout"><button class="perbtn">退出登录</button></a>
								</div>
							</div>		
							</li>
					</ul>
				</div>
			</div>
			<!-- Logo -->
		<div style="width:21%;margin-bottom:20px;">
			<a href="/mmy/" id="logo"> <img class="logo" src="img/页眉LOGO.png" alt="Mmy Html Theme" /></a>
		</div>
		<!-- <div id="index-search">
				<input type="text" id="index-search-input" value="" placeholder="关键字/城市名称/旅游天数"/>
				<button id="index-search-btn"  ><img src="img/index-search.png" style="width:100%;"></img></button>
		</div>	 -->
	</div>
			<div class="index-menu  cbp-af-header">
			<div class="container">
				 <div class="wrap">
			        <nav id="nav">  
			        </nav>
			    </div>
			</div>
			</div>		
		</header>
</body>
</html>